package com.lzj.demo.design.proxy;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.support.ClassPathXmlApplicationContext;

@Slf4j
public class Test_UserDao {
    public static void main(String[] args) {
        //获取代理类的实例对象
        IUserDao userDao = new ClassPathXmlApplicationContext("spring-config.xml").getBean("userDao", IUserDao.class);
        String userName = userDao.queryUserInfo("1001");
        log.info("userName={}",userName);
    }
}
